1. Field of the Invention
The present invention relates generally to a method for re-writing data in a multiple channel data writing apparatus, such as a multiple channel tape drive.
2. Description of the Related Art
Tape drives are used in data systems for recording data, and many of the current tape drives are multiple track tape drives having a plurality of parallel tracks running length wise along the tape.
Tape drives currently in use read the data after performing the write operation to verify that the data which has been written is correct. Error checking and correction (ECC) procedures are followed to assure that the data which was written correctly can be also read and so check if errors occur after the time of writing of the data.
To allow for error checking and correction, data is grouped into data frames. The data frames include a number of tape blocks used for user data, the tape blocks being lengths of tape in which the data is written. The data frames also include a number of error checking and correction blocks that give the redundancy needed to correct any blocks which are determined to have errors during the read operation.
Some tape drives write data to several tracks on the tape simultaneously. The tracks are in parallel running along the length of the tape. To allow for simultaneous read and write operations, the data on each separate track has to be synchronized with data on other tracks within certain limits. Typically, the frames are started simultaneously on all of the tracks. This means that if one electrical write channel corresponding to one track on the tape has to perform rewrite operations, the other channels will have to write padding blocks in the frame to keep the frame synchronization between all of the tracks. This is normally done at the end of each frame allowing for a certain skew within the frames.
The electrical channels write data from one data buffer onto a corresponding track of the tape. All of the data blocks on a given track of the tape thus have been read from corresponding data buffer, passed through a corresponding electrical channel and to a write head of that channel. Data from other tracks along the tape are read from other corresponding data buffers and passed through other channels to other write heads. The read heads and the channels for them likewise correspond to the tape tracks.
Due to the nature of the read/write head contact with the tape and to the distribution of the defects on the tape itself, it is likely that one channel will face more defects and have more rewritten blocks than other channels. This causes a loss in the capacity of the tape which is greater than the corresponding number of blocks actually rewritten. For example, in an eight track tape drive, if one channel has to rewrite four blocks and the other channels have no rewrites, then the other channels will have to write four padding blocks at the end of each frame. The total loss in capacity as the result of these four errors is a loss of eight times the number of rewritten blocks, or 32 blocks.
In practice, the situation is even worse. The normally used rewrite sequence will rewrite all blocks in a channel after the first detected bad block in that channel. If a block n is bad when it is written, it will typically be detected later when a block n+2 has been written. This is due to the distance between the write gap and the read gap in the read/write head. When the rewrite operation is started, the block n will be rewritten as well as the blocks n+1 and n+2 since those blocks were not verified by the read operation before the rewrite sequence was started. An example is shown in FIG. 1 wherein three single block defects in a four track tape caused a loss of capacity of 36 blocks. The capacity loss is increased the greater the number of tracks in the tape.
Referring to FIG. 1, a four track tape is illustrated schematically having four channels ch0, ch1, ch2 and ch3. The illustrated data frame is eight blocks long, in other words, eight data blocks are to be successfully written in each channel to complete the frame. Data is written by a write gap of a read/write head of the tape drive and is read by the read gap of the read/write head for verification. The write and read gaps are spaced from one another. For purposes of the present example, the space corresponds to the length of two data blocks on the tape.
At the beginning of the frame, data blocks a0, b0, c0 and d0 corresponding to the four tracks a, b, c and d are written simultaneously by the write heads (the write gap of the read/write head), as shown in the first column. Next on the tape, the data blocks a1-d1 are written in their respective tracks by the channels, as indicated in the following column. The known data writing scheme thus writes data from a given channel onto a corresponding track of the tape. In other words, the channel ch0 writes the data into the track a, channel ch1 writes the data to track b, channel ch2 writes track c with data, etc.
A third writing operation writes the data blocks a2-d2 in the next column along the tape. In the illustrated example, the data block a2 in channel ch0 includes an error, as indicated by a heavy outline in the drawing. Since the read gap of the read/write head follows the write gap and has not yet reached the data blocks a2-d2, the error in the data block a2 remains undetected. Next, the data blocks a3-d3 are written, followed by the data blocks a4-d4 in their respective channels. At this time, the read gap, which has read and verified the data blocks a0-d0 and a1-c1, reaches the data blocks a2-d2. Upon reading this column of data blocks, the verification software determines that the data block a2 includes an error. To correct the error, when the following column of data blocks are written the data a2 is rewritten in the channel ch0, as indicated by the double outline, while the remaining channels are written with the data blocks b5-d5 for their corresponding tracks.
Since error checking is performed by channel, the known system halts error checking in a channel when an error is found in that channel and only starts checking for errors again when the original error has been corrected. In a following column of data blocks in FIG. 1, the data block a3 is written by the channel ch0 since the data block a3 had not previously been error checked and verified. The data block a3 however includes an as-yet undetected error when it is written a second time, as indicated in heavy outline, and so must eventually be corrected. The next column of data blocks includes the data block a4 which had also not been verified due to halting of the error checking in channel ch0 upon discovery of the error in original block a2. The data blocks b7-d7 are written as well in that column. Next, the data block a5 is written by the first channel ch0 and since the remaining channels ch1-ch3 have completed the data frame of eight blocks in each of their respective tracks, a padding block is written by the channels ch1-ch3. For purposes of illustration, the padding block are marked by hatching and are shown as duplicates of the data block last written in each corresponding channel, the data blocks b7-d7.
The read head reads the second writing of the block a2 as the block a5 is being written and verifies that this second attempt at writing the data of block a2 is correct. The read head then reaches the block a3 and determines that the second writing of the data block a3 includes an error, causing the write head to rewrite the data block a3 by the channel ch0, as indicated by double outline, while write heads for the other channels continuing to write padding blocks, marked by diagonal lines, in the remaining three tracks. In the next write operation, the data block a4 is written a third time by channel ch0, but it contains an as-yet undetected error. Padding blocks continue to be written by the remaining channels. The corrected data block a4 is not rewritten by the channel ch0 until the sixth group of padding blocks are written by the channels ch1-ch3. After rewriting the block a4 a fourth time, it is error free.
Writing of the data blocks continues to the end of the frame. The frame is finished by the writing of a data block a7 by the channel ch0. The next frame is started after the end of the illustrated frame. Since the start of the next frame must not be skewed across the tracks, 36 padding blocks were written by channels which had no errors. Six extra blocks were written by channel ch0 besides the three which were in error. All of these extra data blocks and padding blocks occupy space on the tape. Thus, a considerable amount of tape space is consumed for error correction of only three errors.